Repository navigation
Trees off roads: whole trunk checked, headroom over streets, slimmer models where one does not fit - #1517
Merged
Conversation
…models where one does not fit - Every wood column of a tree model is checked against the roads, not only the model's middle: off any paving for scattered trees, off the carriageway for mapped ones. - Leaves keep 4 m clear over carriageways and 2.5 m over footways and paving. - A model that does not fit turns, then gives way to a slimmer or smaller one of its species, then to another species of its community. - Mapped trees in the road move out of it: as picked up to 4 m, as any model that fits up to 8 m, onto open ground before a sidewalk. - Carriageway mask collected in the same pass as the road mask.
|
⏱️ Benchmark run finished in 0m 44s 📈 Compared against baseline: 48s time, 1250 MB memory ✅ This PR improves generation time. 📅 Last benchmark: 2026-11-14 12:50:53 UTC You can retrigger the benchmark by commenting |
…re moving, review fixes - A mapped tree tries its own pool first (its genus, its leaf type or its community) at the nearest spot off the road, so a slimmer model of its species stands where it is mapped before it moves, and a lime stays a lime up to 8 m away before a tree of its community stands in. Its middle stays off the carriageway too, so a model without logs cannot hang over it. - Headroom stops growing past 1:1, micro trees keep their leaves, and mapped trees can always step off a road drawn at its narrowest. - Signs read the editor's carriageway mask instead of building their own. - The base row is only worked out when wood reaches over a road, taken slots are skipped before picking, and the spot checks are shared.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Trees no longer stand in the road or hang low over it. Mapped street trees that land in a road drawn wider than the real one move to the kerb, and a tree whose model does not fit beside a road is replaced by one that does instead of being left out.
Problem
natural=tree,natural=tree_row) skipped the check so they can stand on sidewalks. Where the road is drawn wider than the real one, that put them in the road.Changes
Results
Munich, 1.3 × 1.6 km (
48.134,11.560,48.146,11.582), default trees:Performance
CI benchmark area, main against this PR, runs interleaved: wall time, CPU and peak memory the same within noise. The fit check walks a model's wood columns, usually a handful, works out the base row only when wood reaches over a road, and searches further only when the picked model does not fit. Slots already taken are skipped before picking. The carriageway mask is one bit per column, replaces the one signs built for themselves, and is dropped before saving.
Testing
cargo test: 2,673 passed. Clippy and fmt clean.Known limits